//保存token
export const localSetToken = (token: string) => {
  localStorage.setItem('AccountToken', token);
};
//获取token
export const localGetToken = () => {
  return localStorage.getItem('AccountToken');
};

//保存用户账号信息
export const localSetUserInfo = (userInfo: any) => {
  const data = userInfo ? JSON.stringify(userInfo) : '';
  localStorage.setItem('AccountUserInfo', data);
};
//获取用户账号信息
export const localGetUserInfo = () => {
  const accountInfo = localStorage.getItem('AccountUserInfo');
  return accountInfo ? JSON.parse(accountInfo) : '';
};

//获取新用户账号信息
export const localNewGetUserInfo = () => {
  const accountInfo = sessionStorage.getItem('loginInfo');
  return accountInfo ? JSON.parse(accountInfo) : '';
};
